home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / Developer University / DUProjects / Graphics / Sources / Frame.h < prev    next >
Encoding:
Text File  |  1996-08-16  |  2.3 KB  |  64 lines  |  [TEXT/CWIE]

  1. //    Copyright © 1995 Apple Computer, Inc. All rights reserved.
  2. //    Release Version:    $ 1.0 d11 $
  3.  
  4. #ifndef FRAME_H
  5. #define FRAME_H
  6.  
  7. //=======================================================================
  8. // ----- Framework Includes -----
  9. #ifndef FWFRAME_H
  10. #include <FWFrame.h>        // FW_CFrame
  11. #endif
  12.  
  13. //=======================================================================
  14. class CGraphicsPart;
  15. class CGraphicsPart;
  16. class FW_CLineShape;
  17. class FW_CRegionShape;
  18. class FW_CPolygonShape;
  19. class FW_CPrintHandler;
  20.  
  21. //=======================================================================
  22. class CGraphicsFrame : public FW_CFrame {
  23. public:
  24.     FW_DECLARE_AUTO(CGraphicsFrame)
  25.                         CGraphicsFrame(Environment* ev, 
  26.                                     ODFrame* odFrame, 
  27.                                     FW_CPresentation* presentation, 
  28.                                     CGraphicsPart* graphicsPart);
  29.     virtual             ~CGraphicsFrame();
  30. protected:
  31. // overrides
  32.     virtual void        Draw(Environment *ev, 
  33.                                  ODFacet* odFacet, 
  34.                                  ODShape* invalidShape);
  35.     virtual void        FacetAdded(Environment* ev, ODFacet* facet, unsigned short facetCount);
  36.     virtual FW_Boolean     DoMouseDown(Environment* ev, 
  37.                                     const FW_CMouseEvent& theMouseEvent);
  38. // overrides printing
  39.     virtual FW_CPrintHandler*    NewPrintHandler(Environment* ev);
  40.     virtual    FW_Boolean            IsCurrentlyPrintable(Environment* ev) const;
  41.     virtual void                GetPrintContentExtent(Environment *ev, FW_CPoint& extent) const;
  42. // new members
  43.     virtual FW_CPictureShape*     MyCreatePictureShape(Environment* ev);
  44.     virtual FW_CPolygonShape*     MyCreatePolygonShape(Environment* ev);
  45.     virtual FW_CLineShape*         MyCreateLineShape(Environment* ev);
  46.     virtual FW_CRegionShape*     MyCreateRegionShape(Environment* ev);
  47.     virtual void         MyDrawBackground(Environment* ev, FW_CGraphicContext& gc);
  48.     virtual void         MyDrawShapes(Environment* ev, FW_CGraphicContext& gc);
  49.     virtual void         MyDrawText(Environment* ev, FW_CGraphicContext& gc);
  50.     virtual void         MyDrawPictures(Environment* ev, FW_CGraphicContext& gc);
  51.     virtual void         MyDrawLine(Environment* ev, FW_CGraphicContext& gc);
  52.     virtual void         MyDrawPolygon(Environment* ev, FW_CGraphicContext& gc);
  53.     virtual void         MyInvalidateLine(Environment* ev);
  54. private:
  55.     FW_CPictureShape*    fLargePictureShape;
  56.     FW_CLineShape*        fLineShape;
  57.     FW_CRegionShape*    fRegionShape;
  58.     FW_CPolygonShape*    fPolygonShape;
  59.     FW_CRect            fLargePictRect;
  60. };
  61.  
  62. //=======================================================================
  63. #endif
  64.